"""
sldfjlkdsj
"""
from collections import Sequence
from random import choice

from util import pr


class Test(Sequence):
    def __len__(self):
        return 2

    def __getitem__(self, item):
        if isinstance(item, slice):
            return 'slice'
        if item is self:
            return 'self'
        if isinstance(item, int) and item > 3:
            raise IndexError
        return item


test = Test()
for i in reversed(test):
    pr(i)
for i in test:
    pr(i)

all_values = set()
for i in range(1000):
    all_values.add(choice(test))
pr(test[:2], test[2], test[test], test['hello'], *sorted(list(all_values)))
